<?php
/**
 * Created by PhpStorm.
 * User: t
 * Date: 2024/3/16
 * Time: 10:11
 */

namespace app\admin\controller;

use app\Request;


use think\captcha\facade\Captcha  ;
class  Verify{

    public  function  index( Request $request){
        $img =  Captcha::create();
        $base64_image = "data:image/png;base64," . base64_encode($img->getData());
        $key = session('captcha.value');
        return success('',['base64'=>$base64_image,'text'=>strtolower($key)]);

    }



}